using System;
using System.Data.Entity.ModelConfiguration;
using System.Data.Common;
using System.Data.Entity;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using DomainLayer.Data.Entities;

namespace Infrastructure.Data.Mapping
{
	public class WaybillComplaintInfoMap : EntityTypeConfiguration<WaybillComplaintInfo>
	{
		public WaybillComplaintInfoMap()
		{
			// Primary Key
			this.HasKey(t => t.WaybillComplaintId);

			// Properties
			this.Property(t => t.WaybillType)
				.HasMaxLength(50);
				
			this.Property(t => t.CompanyName)
				.HasMaxLength(50);
				
			this.Property(t => t.Province)
				.HasMaxLength(50);
				
			this.Property(t => t.City)
				.HasMaxLength(50);
				
			this.Property(t => t.Area)
				.HasMaxLength(50);
				
			this.Property(t => t.Distrct)
				.HasMaxLength(50);
				
			this.Property(t => t.PromiseDeliveryTime)
				.HasMaxLength(60);
				
			this.Property(t => t.Content)
				.HasMaxLength(500);
				
			this.Property(t => t.Paytype)
				.HasMaxLength(20);
				
			this.Property(t => t.DeliveryRound)
				.HasMaxLength(20);
				
			this.Property(t => t.PostRound)
				.HasMaxLength(20);
				
			this.Property(t => t.IsDeliveryLate)
				.HasMaxLength(20);
				
			this.Property(t => t.IsPostLate)
				.HasMaxLength(20);
				
			this.Property(t => t.WareHouseName)
				.HasMaxLength(40);
				
			this.Property(t => t.DeliverMan)
				.HasMaxLength(50);
				
			this.Property(t => t.ComplaintResson)
				.HasMaxLength(500);
				
			this.Property(t => t.UndoReason)
				.HasMaxLength(20);
				
			this.Property(t => t.ValideReason)
				.HasMaxLength(20);
				
			this.Property(t => t.AppearReason)
				.HasMaxLength(50);
				
			this.Property(t => t.Remark)
				.HasMaxLength(500);
				
			this.Property(t => t.Status)
				.HasMaxLength(20);
				
			this.Property(t => t.SourcesName)
				.HasMaxLength(50);
				
			// Table & Column Mappings
			this.ToTable("WaybillComplaintInfo");
			this.Property(t => t.WaybillComplaintId).HasColumnName("WaybillComplaintId");
			this.Property(t => t.Date).HasColumnName("Date");
			this.Property(t => t.WaybillNo).HasColumnName("WaybillNo");
			this.Property(t => t.WaybillType).HasColumnName("WaybillType");
			this.Property(t => t.CompanyName).HasColumnName("CompanyName");
			this.Property(t => t.ExpressCompanyID).HasColumnName("ExpressCompanyID");
			this.Property(t => t.PostTime).HasColumnName("PostTime");
			this.Property(t => t.PayTime).HasColumnName("PayTime");
			this.Property(t => t.Deliverytime).HasColumnName("Deliverytime");
			this.Property(t => t.HandInTime).HasColumnName("HandInTime");
			this.Property(t => t.Inputtime).HasColumnName("Inputtime");
			this.Property(t => t.Province).HasColumnName("Province");
			this.Property(t => t.City).HasColumnName("City");
			this.Property(t => t.Area).HasColumnName("Area");
			this.Property(t => t.Distrct).HasColumnName("Distrct");
			this.Property(t => t.PromiseDeliveryTime).HasColumnName("PromiseDeliveryTime");
			this.Property(t => t.Content).HasColumnName("Content");
			this.Property(t => t.Paytype).HasColumnName("Paytype");
			this.Property(t => t.DeliveryRound).HasColumnName("DeliveryRound");
			this.Property(t => t.PostRound).HasColumnName("PostRound");
			this.Property(t => t.IsDeliveryLate).HasColumnName("IsDeliveryLate");
			this.Property(t => t.IsPostLate).HasColumnName("IsPostLate");
			this.Property(t => t.WareHouseName).HasColumnName("WareHouseName");
			this.Property(t => t.ArriveTime).HasColumnName("ArriveTime");
			this.Property(t => t.FirstContactTime).HasColumnName("FirstContactTime");
			this.Property(t => t.ExceptionReplyTime).HasColumnName("ExceptionReplyTime");
			this.Property(t => t.PlanArriveTime).HasColumnName("PlanArriveTime");
			this.Property(t => t.DeliverMan).HasColumnName("DeliverMan");
			this.Property(t => t.ComplaintResson).HasColumnName("ComplaintResson");
			this.Property(t => t.IsValide).HasColumnName("IsValide");
			this.Property(t => t.UndoReason).HasColumnName("UndoReason");
			this.Property(t => t.ValideReason).HasColumnName("ValideReason");
			this.Property(t => t.AppearReason).HasColumnName("AppearReason");
			this.Property(t => t.Remark).HasColumnName("Remark");
			this.Property(t => t.Status).HasColumnName("Status");
			this.Property(t => t.CreateTime).HasColumnName("CreateTime");
			this.Property(t => t.UpdateTime).HasColumnName("UpdateTime");
			this.Property(t => t.CreateBy).HasColumnName("CreateBy");
			this.Property(t => t.UpdateBy).HasColumnName("UpdateBy");
			this.Property(t => t.Type).HasColumnName("Type");
			this.Property(t => t.Sources).HasColumnName("Sources");
			this.Property(t => t.SourcesName).HasColumnName("SourcesName");
		}
	}
}

